package com.qhyiyun.baseweb.config;
import com.qhyiyun.baseweb.filter.DeParamFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class FilterConfig {
    private static final Logger logger= LoggerFactory.getLogger(FilterConfig.class);
    @Bean
    public FilterRegistrationBean<DeParamFilter> decryptFilter() {
        FilterRegistrationBean<DeParamFilter> registrationBean = new FilterRegistrationBean<>();
        registrationBean.setFilter(new DeParamFilter());
        registrationBean.addUrlPatterns("/**"); // 根据实际情况配置URL模式
        logger.info("filter register------"+registrationBean.getFilterName());
        return registrationBean;
    }
}
